{%extends file="user/page/layout.tpl"%}

{%block name="sub-head-static"%}
    {%require name="common:static/lib/js/highcharts.js"%}
    {%require name="user:static/assetsdemand/assetsdemand.less"%}
    {%require name="user:static/assetsdemand/assetsdemand.js"%}
    <script>
        P.data('summary',{%json_encode($data)%});
    </script>
{%/block%}

{%block name="right-content"%}
<div class="page-assetsdemand">
    <div class="block assets-block">
        <div>
            <div class="block-left">
                <div class="demand-amount">
                    <div class="value">￥{%$data.yesterday_profit|format_amount:2%}</div>
                    <div class="desc">昨日收益(<a class="text-link" href="#profit">查看说明</a>)</div>
                </div>
            </div>
            <div class="block-right">
                <div class="summary">

                    <div class="number-block">
                        <i class="ob-icon bo-icon-cycle2"></i>
                        <div class="ob-context">
                            <div class="ob-title ob-title1 now-profit">￥{%$data.bought_amount|format_amount%}</div>
                            <div class="ob-info">当前持有份额</div>
                        </div>
                    </div>

                    <div class="number-block">
                        <i class="ob-icon bo-icon-cycle2"></i>
                        <div class="ob-context">
                            <div class="ob-title ob-title1 now-profit">￥{%$data.total_return|format_amount%}</div>
                            <div class="ob-info">累计收益</div>
                        </div>
                    </div>

                    <div class="clear"></div>
                </div>
                <div>
                    {%if $data.plat_usable_amount>=1%}
                    <a class="btn btn-large btn-main" href="/user/buydemand">购买</a>
                    {%else%}
                    <a class="btn btn-large btn-disable">已售完</a>
                    {%/if%}
                    <a class="btn btn-large" href="/user/redeemdemand">赎回</a>
                </div>
            </div>
            <div class="clear"></div>
        </div>
        {%if $data.plat_usable_amount<1%}
        <div class="new-user">
            <span>新注册用户独享</span>
            <a href="/user/buydemandnewuser" class="new-user-buy">1000元优先购买权</a>
        </div>
        {%/if%}
    </div>

    <div class="block profit-block">
       <div>
           <ul class="type-tab">
               <li><a class="active" data-type='accumulate'>累计收益趋势</a></li>
               <li><a data-type="day">每日收益趋势</a></li>
               <div class="clear"></div>
           </ul>
       </div>
        <div class='accumulate-profit'></div>
        <div class='day-profit'></div>
    </div>

    <div class="block tip-block">
        <h5>温馨提示：</h5>
        <a name="profit"></a>
        <p style="font-weight: 700;font-size: 15px">1、假如您投资真融宝活期一万元，昨日收益是<span style="color:#ff6b36;font-size: 18px">￥{%$data.ten_thousand_profit|format_amount%}</span></p>
        <p>2、真融宝活期页面上展示的是复合年化利率，由于真融宝会按日复投，所以这个值会比单日年化收益率高一些。
            举例来说，页面上展示的当日年化利率为14%，若您存10000元，通过每日利息复投，一年后您的活期资产将变为11400元</p>
        <p>3、真融宝活期是按日复投。
        举例来说，假如您存10000元在真融宝活期中，根据当日年化收益率获得3.8元收益，第二天真融宝会将这3.8元放入您持有的活期份额中，并同10000元一起作为本金继续投资。
        也就是说，第二天你投资的活期本金为10003.8元。依次类推，您每天投资的的活期本金是前一天的本金加收益。</p>
    </div>
</div>
{%/block%}